<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="/template/principal.xhtml">
        <ui:define name="conteudo">
            <h:form>
                <p:panel header="Cadastro de Sprint">
                    <p:focus/>
                    <p:messages globalOnly="true"/>
                    <p:tabView >
                        <p:tab title="Dados do Sprint" >
                            <h:panelGrid columns="3">
                                <h:outputText value="Nome:"/>
                                <p:inputText id="nome" value="#{sprint.novosprint.nome}" size="25" maxlength="25" required="true" requiredMessage="Campo Obrigatório"/>
                                <p:message for="nome"/>
                                <h:outputText value="Data de Inicio:"/>
                                <p:calendar id="di" value="#{sprint.novosprint.dataIn}" locale="pt_BR" size="10" maxlength="10"/>
                                <p:message for="di"/>
                                <h:outputText value="Data de Fim:"/>
                                <p:calendar id="df" value="#{sprint.novosprint.dataFim}" locale="pt_BR" size="10" maxlength="10"/>
                                <p:message for="df"/>
                                 <h:outputText id="resp" value="Projeto:"/>
                                 <h:selectOneMenu id="projeto" binding="#{sprint.projetoSelecionado}">
                                     <f:selectItem noSelectionOption="true" itemLabel="--Selecione um Projeto -- "/>
                                     <f:selectItems value="#{projeto.projetosCombo}"/>
                                </h:selectOneMenu>
                                <p:message for="resp"/>

                            </h:panelGrid>
                            <h:panelGrid columns="2">
                                <h:commandButton value="Salvar" action="#{sprint.salvar}"/>
                                <h:commandButton value="Cancelar" action="#"/>
                            </h:panelGrid>        
                        </p:tab>
                    </p:tabView>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
